package com.lrkj.payfee.mapper;

import java.math.BigDecimal;
import java.util.List;

import com.lrkj.payfee.domain.Receipt;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 收款单Mapper接口
 *
 * @author yajun_ren
 * @date 2021-08-06
 */
@Component
public interface ReceiptMapper
{
    /**
     * 查询收款单
     *
     * @param receiptId 收款单ID
     * @return 收款单
     */
    public Receipt selectReceiptById(String receiptId);

    /**
     * 查询收款单列表
     *
     * @param receipt 收款单
     * @return 收款单集合
     */
    public List<Receipt> selectReceiptList(Receipt receipt);

    /**
     * 新增收款单
     *
     * @param receipt 收款单
     * @return 结果
     */
    public int insertReceipt(Receipt receipt);

    /**
     * 修改收款单
     *
     * @param receipt 收款单
     * @return 结果
     */
    public int updateReceipt(Receipt receipt);

    /**
     * 删除收款单
     *
     * @param receiptId 收款单ID
     * @return 结果
     */
    public int deleteReceiptById(String receiptId);

    /**
     * 批量删除收款单
     *
     * @param receiptIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteReceiptByIds(String[] receiptIds);

    /**
     * 检查收款日期
     *
     * **/
    public int checkBillDate(Receipt receipt);

    // 批量新增收款单
    public int batchAddData(@Param("saveBeans") List<Receipt> receipts);

    BigDecimal indexReceivableMoney(String time);
}
